import { request } from 'umi';

/**
 * 查询素材
 */
export const materialFileList = (
  server: string,
  params: {
    [key: string]: any;
  },
) => {
  return request<any>(`${server}/api/materialFile/materialFileList`, {
    params,
    getResponse: true,
  });
};
/**
 * 添加素材
 */
export const addMaterialFile = (server: string, data: any) => {
  return request<any>(`${server}/api/materialFile/addMaterialFile`, {
    method: 'post',
    getResponse: true,
    data
  });
};

/**
 * 删除素材
 */
export const deleteMaterialFile = (server: string, ids: string) => {
  return request<any>(`${server}/api/materialFile/deletedMaterialFile?ids=` + ids);
};
